home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
176-200
/
scopedisk188
/
backtalk
/
asend.bt
< prev
next >
Wrap
Text File
|
1995-03-19
|
1KB
|
50 lines
/* sendfile - send a file through BT */
/* This is a "prompted" ascii upload script written by Larry Phillips */
/* It was written to demonstrate the usage of the ONSTRING and the */
/* OFFSTRING commands. It was also written because Larry feels the */
/* xprascii.library leaves a lot to be desired. */
options results
call openport('BT_msg')
GETFILENAME
if words(result) < 1 then exit
if open(infile,result,'r') ~= 0 then do
ONSTRING "^M"
do forever
x = readln(infile)
if EOF(infile) then do
OFFSTRING
call getout
end
SEND x
call waitforit
end
end
waitforit:
packet = getpkt('BT_msg')
do while packet = '00000000'x
call waitpkt('BT_msg')
packet = getpkt('BT_msg')
end
arg0 = getarg(packet)
call reply(packet,0)
select
when arg0 = 'OFF' then return
when arg0 = 'MATCH' then nop
otherwise nop
end
return
getout:
do until arg0 = 'OFF'
call waitforit
end
MESSAGE "----- File sent -----"
exit